﻿using System;
using System.Windows.Data;

namespace Rabbit.Converters
{
    [ValueConversion(typeof(int), typeof(bool))]
    public class LessThanOrEqualConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return int.Parse(value.ToString()) <= int.Parse(parameter.ToString());
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
